<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="h" uri="/hd-tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客户档案</title>
<script type="text/javascript" src="js/datepicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>

<link href="style/main.css" rel="stylesheet" type="text/css"/>
<link  href="style/glowtabs.css" rel="stylesheet" type="text/css" />
</head>

<body class="body_content">
<div id="wrap">
	<div id="main" class="clearfix">

<jsp:include page="../header.jsp"></jsp:include>

<div class="ricoh_content_k">
  <div class="ricoh_content_in" style="padding-left:38px;">
          <div class="searchmore">
          <div class="searchmoretop"></div>
          <div class="fr searchmoreright"></div>
          <div class="fl searchmoreleft"></div>
          <div class="fl searchmoretitle">客户档案</div>
          
          
          <div style="padding-top:30px;_padding-top:3px;padding-left:30px;">
          
            <form action="trans_saveNewTransaction.action" method="post" onsubmit="return validation();">
            
          		<div class="inform_guest_k">
          		
                	<div class="inform_guest" style="width:25%"><label>客户名称：</label>
                	
              	      <s:select list="customers" name="customerId" id="customerId" listKey="customerId" listValue="%{unitName}" headerKey="" headerValue="请选择客户" theme="simple"></s:select>
               	   
               	    </div>
               	    
                    <div class="inform_guest" style="width:25%"><label>部门：</label>
                      <input type="text" name="purchaseRecord.department" id="department" maxlength="50"/>
                    </div>
                    
                    <div class="inform_guest" style="width:25%"><label>主管：</label>
                      <input type="text" name="purchaseRecord.director" id="director" maxlength="20"/>
                    </div>
                    
                </div>
                
                
	            <div class="inform_guest_k">
	            
	                <div class="inform_guest" style="width:25%"><label>联系人：</label>
	                	<input type="text" name="purchaseRecord.contactor" id="contactor" maxlength="30"/>
	                </div>
	                
	                <div class="inform_guest" style="width:25%"><label>联系方式：</label>
	                    <input type="text" name="purchaseRecord.contactWay" id="contactWay" maxlength="25""/>
	                </div>
	                
	            </div>
            
            
            
            
	            <div class="inform_guest_k">
	            
	                <div class="inform_guest" style="width:25%"><label>机器序号：</label>
	                	<input type="text" name="purchaseRecord.machineNo" id="machineNo" maxlength="55"/>
	           	    </div>
	           	    
	                <div class="inform_guest" style="width:65%"><label>机器型号：</label>
	                    
	                    <s:select list="machines" name="purchaseRecord.machineModel" id="machineModel" listKey="machineId" listValue="%{machineModel}" headerKey="" headerValue="请选择机型" theme="simple"></s:select>
					</div>
					
            	</div>
            	
            	
	            <div class="inform_guest_k">
	                <div class="inform_guest" style="width:98%">
	                	<label>选购件：</label>              	
	                	  <input type="checkbox" value="件1" name="purchaseRecord.optionParts" class="checkbox" style="border:none" />
	                	  	  <label style="width:2em; text-align:left">件1</label>
	                	  	  
	                	  <input type="checkbox" value="件2" name="purchaseRecord.optionParts" class="checkbox"  style="border:none"/>
	                	  	  <label style="width:2em; text-align:left">件2</label>
	                	  	  
	                	  <input type="checkbox" value="件3" name="purchaseRecord.optionParts" class="checkbox" style="border:none" />
	                	  	  <label style="width:2em; text-align:left">件3</label>
	                	  	  
		                  <input type="checkbox" value="件4" name="purchaseRecord.optionParts" class="checkbox" style="border:none" />
		                	  <label style="width:2em; text-align:left">件4</label>
		                	  
		                  <input type="checkbox" value="件5" name="purchaseRecord.optionParts" class="checkbox"  style="border:none"/>
		                	  <label style="width:2em; text-align:left">件5</label>
		                	  
		                  <input type="checkbox" value="件6" name="purchaseRecord.optionParts" class="checkbox"  style="border:none"/>
		                	  <label style="width:2em; text-align:left">件6</label>
		                	  
		                  <input type="checkbox" value="件7" name="purchaseRecord.optionParts" class="checkbox"  style="border:none"/>
		                	  <label style="width:2em; text-align:left">件7</label>
		             </div>
	            </div>
	            
	            
	            <div class="inform_guest_k">
	            
	           	   <div class="inform_guest" style="width:25%">
	           	   		<label>购买日期：</label>
	                	  <input name="purchaseDate" type="text" id="purchaseDate" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="21"
							onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"></input>
	           	   </div>
	           	   
	               <div class="inform_guest" style="width:25%">
	               		<label>购买价格：</label>
	                      <input type="text" name="purchaseRecord.price" id="price" maxlength="10"/>
	               </div>
	               
	               <div class="inform_guest" style="width:25%">
	               		<label>发票号码：</label>
	                      <input type="text" name="purchaseRecord.invoiceNo" id="invoiceNo" maxlength="55"/>
	               </div>
	               
	               <div class="inform_guest" style="width:20%">
	               		<label>销售员：</label>
		              	   <s:select list="salesperson" name="purchaseRecord.seller" id="seller" listKey="name" listValue="%{name}" headerKey="" headerValue="请选择" theme="simple"></s:select>
	               </div>
	               
	            </div>
	            
	            
	            <div class="inform_guest_k">
	            
	              <div class="inform_guest" style="width:25%">
	              		<label>安装日期：</label>
	                	  <input name="installDate" type="text" id="installDate" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="21"
							onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"></input>
	           	  </div>
	           	  
	           	  <div class="inform_guest" style="width:25%">
	           	  		<label>合同开始日：</label>
	                	  <input name="contractStartDate" type="text" id="contractStartDate" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="21"
							onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"></input>
	           	  </div>
	           	  
	              <div class="inform_guest" style="width:0%">
	           	  </div>
	           	  
	              <div class="inform_guest" style="width:25%">
	              		<label>合同到期日：</label>
	                      <input name="contractEndDate" type="text" id="contractEndDate" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="21"
							onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"></input>
	              </div>
	              
	            </div>
	                    
	                    
	              <div class="inform_guest_k">
		           	  <div class="inform_guest" style="width:25%">
		           	  		<label>维修员：</label>
			                  
			   	              <s:select list="maintenanceMen" name="purchaseRecord.repairman" id="repairman" listKey="name" listValue="%{name}" headerKey="" headerValue="请选择" theme="simple"></s:select>
		           	  </div>
		           	  
		              <div class="inform_guest" style="width:25%">
		              		<label>签约形态：</label>
		                      <select name="purchaseRecord.signingForm" id="signingForm">
			                	    <option>签约形态</option>
			   	              </select>
		              </div>
		              
		              <div class="inform_guest" style="width:25%">
		              		<label>保养周期：</label>
		                       <select name="maintainPeriod" id="maintainPeriod">
			                	    <option value="1">一个月</option>
			                	    <option value="2">两个月</option>
			                	    <option value="3">三个月</option>
			   	               </select>
		              </div>
		                    
		              <div class="inform_guest" style="width:20%">
		              		<label>计数器值：</label>
		                	  <input type="text" name="purchaseRecord.counter" id="counter"  style="width:50px;" maxlength="10"/>
		         	  </div>
		                    
	              </div>
	              
	              
	              
	              <div class="inform_guest_k">
		           	  <div class="inform_guest" style="width:97%"><label>备注：</label>
		                	  <input type="text" name="purchaseRecord.remark" id="remark"  style="width:350px;" maxlength="100"/>
		         	  </div>
	              </div>
	              
	              
		          <div class="inform_guest_k">
			           <!--<div class="inform_guest" style="width:25%"><label>状态：</label>
			                	  <select name="select" id="select">
			                	    <option>-----</option>
			   	                  </select>
			           	  </div>-->
		           	  
		              <div class="inform_guest" style="width:25%">
		              		<label>预警日期：</label>
		                      <input name="warnDate" type="text" id="warnDate" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="21"
								onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"></input>
		              </div>
		              
		              <div class="inform_guest" style="width:45%">
		              		<label>预警内容：</label>
		                      <input type="text" name="purchaseRecord.warnContent" id="warnContent" style="width:250px;" maxlength="100"/>
		              </div>
		          </div>
		            
		          <div class="inform_guest_k">
		          	<div class="inform_guest" style="width:25%;margin-left:100px">
		            	<input type="submit" value="保存" class="send_btn"/>
		            </div>	
		          </div>
	          
	           </form>
	            
              <div class="clear"></div>
          </div>
           
          
           
          <div class="clear searchmorebottom"></div>
      </div>
  </div>
</div>

</div>
</div>
<jsp:include page="../footer.jsp"></jsp:include>
</body>
<script type="text/javascript" src="js/ddtabmenu.js"></script>
<script type="text/javascript">
	ddtabmenu.definemenu("ddtabs2", 3);
	
	$(document).ready(function(){
		if(${statusTemp} == true){
			alert("添加成功");
		}
	});

	function validation(){
		if($("#customerId").val() == ""){
			alert("请选择客户");
			return false;
		}
		if($("#department").val() == ""){
			alert("请输入部门名称");
			return false;
		}else if($("#director").val() == ""){
			alert("请输入主管");
			return false;
		}else if($("#contactor").val() == ""){
			alert("请输入联系人");
			return false;
		}else if($("#contactWay").val() == ""){
			alert("请输入联系方式");
			return false;
		}else if($("#machineNo").val() == ""){
			alert("请输入机器序号");
			return false;
		}else if($("#purchaseDate").val() == ""){
			alert("请选择购买日期");
			return false;
		}else if($("#price").val() == ""){
			alert("请输入购买价格");
			return false;
		}else if($("#invoiceNo").val() == ""){
			alert("请输入发票号码");
			return false;
		}else if($("#seller").val() == ""){
			alert("请选择销售员");
			return false;
		}else if($("#installDate").val() == ""){
			alert("请输入选择安装日期");
			return false;
		}else if($("#contractStartDate").val() == ""){
			alert("请输入选择合同开始日");
			return false;
		}else if($("#contractEndDate").val() == ""){
			alert("请输入选择合同到期日");
			return false;
		}else if($("#repairman").val() == ""){
			alert("请选择维修员");
			return false;
		}else if($("#counter").val() == ""){
			alert("请输入计数器值");
			return false;
		}else if($("#remark").val() == ""){
			alert("请输入备注");
			return false;
		}else if($("#warnDate").val() == ""){
			alert("请选择预警日期");
			return false;
		}else if($("#warnContent").val() == ""){
			alert("请输入预警内容");
			return false;
		}else{
			return true;
		}
	}
</script>
</html>